package com.mi.system.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mi.system.dto.query.DictQueryDTO;
import com.mi.system.dto.request.DictRequestDTO;
import com.mi.system.entity.Dict;
import com.mi.system.vo.DictVO;

/**
 * Dict service
 *
 * @author jin_huaquan
 * @version 1.0
 * @date 2021/11/1 13:54
 */
public interface DictService extends IService<Dict> {

    /**
     * list dict
     *
     * @param page  page info
     * @param query query info
     * @return dict list
     */
    Page<DictVO> listDict(Page page, DictQueryDTO query);

    /**
     * save dict
     *
     * @param request dict info
     * @return result
     */
    boolean saveDict(DictRequestDTO request);

    /**
     * update dict
     *
     * @param id      dict id
     * @param request dict info
     * @return result
     */
    boolean updateDict(Long id, DictRequestDTO request);

    /**
     * remove dict
     *
     * @param id dict id
     * @return result
     */
    Dict removeDict(Long id);
}
